/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.RemoteException;
import java.rmi.server.RemoteServer;
import java.rmi.server.ServerNotActiveException;

import application.controller.server.UseCaseControllerExemplarLoan;
import application.exceptions.ClientNotFoundException;
import application.exceptions.DatabaseException;
import application.exceptions.ExemplarAlreadyLend;
import application.exceptions.ExemplarNotFoundException;
import application.exceptions.InsufficientClientRightsException;
import application.exceptions.SessionException;

/**
 * The Class ExemplarLoanRemoteImpl.
 */
public class ExemplarLoanRemoteImpl extends AbstractRemoteImpl implements
		ExemplarLoanRemote {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1L;
	
	/** The _controller. */
	UseCaseControllerExemplarLoan _controller;

	/**
	 * Instantiates a new exemplar loan remote impl.
	 * 
	 * @throws RemoteException
	 *             the remote exception
	 */
	public ExemplarLoanRemoteImpl() throws RemoteException {
		super();
		_controller = new UseCaseControllerExemplarLoan();
	}

	/* (non-Javadoc)
	 * @see application.server.ExemplarLoanRemote#loanMedium(String, int, int)
	 */
	@Override
	public void loanMedium(String sessionId, int exemplarId, int clientId)
			throws RemoteException, ClientNotFoundException,
			ExemplarNotFoundException, DatabaseException, ExemplarAlreadyLend, SessionException, InsufficientClientRightsException, ServerNotActiveException {
		_controller.loanMedium(sessionId, "", exemplarId, clientId);

	}
}
